package com.cmc.cloud.cmclink.doc.vo.setupweightlimitedvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;
import javax.validation.constraints.*;

/**
 * 限重维护 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SetupWeightLimitedBaseVO {

    @Schema(description = "航线代码")
    @Length(max = 50, message = "{SetupWeightLimitedBaseVO.laneCode.Length}")
    private String laneCode;

    @Schema(description = "船舶代码")
    @Length(max = 50, message = "{SetupWeightLimitedBaseVO.vesselCode.Length}")
    private String vesselCode;

    @Schema(description = "操船方代码")
    @Length(max = 3, message = "{SetupWeightLimitedBaseVO.vesselOperatorCode.Length}")
    private String vesselOperatorCode;

    @Schema(description = "装货港", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SetupWeightLimitedBaseVO.polCode.NotBlank}")
    @Length(max = 5, message = "{SetupWeightLimitedBaseVO.polCode.Length}")
    private String polCode;

    @Schema(description = "卸货港")
    @Length(max = 5, message = "{SetupWeightLimitedBaseVO.podCode.Length}")
    private String podCode;

    @Schema(description = "箱型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotBlank(message = "{SetupWeightLimitedBaseVO.cntrType.NotBlank}")
    @Length(max = 2, message = "{SetupWeightLimitedBaseVO.cntrType.Length}")
    private String cntrType;

    @Schema(description = "箱尺寸", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SetupWeightLimitedBaseVO.cntrSize.NotBlank}")
    @Length(max = 2, message = "{SetupWeightLimitedBaseVO.cntrSize.Length}")
    private String cntrSize;

    @Schema(description = "限重（Kg）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SetupWeightLimitedBaseVO.limitWeight.NotNull}")
    private BigDecimal limitWeight;

}
